<extend name="common" />
<block name="main">
<div class="bd">
	<div class="table-responsive">
  <table class="table table-striped table-hover">
  <tbody>
  	<thead>
    <tr class="success">
		<th>分组名称</th>
		<th>分组简介</th>
		<th>操作</th></tr>
  	</thead>
	<foreach name="groups" item="group">
	<tr>
      <td>{$group.group_name}</td>
      <td>{$group.group_intro}</td>
      <td>
        <if condition="$self_auth neq 'tour'">
      	<a href="{:U('Home/Project/editGroup',['pid'=>$project_id,'group_id'=>$group['group_id']])}"><i class="glyphicon glyphicon-pencil"></i></a>&nbsp&nbsp
      	<a href="javascript:;" class="remove-group"><i class="glyphicon glyphicon-remove"></i></a>
      	</if>
      </td>
    </tr>
  	</foreach>
  </tbody>
</table>
</div>
</div>
<script>
$('.remove-group').on('click',function(){
	$.post("{:U('Home/Project/removeGroup')}",{pid:{$project_id},group_id:{$group['group_id']}},function(rs){
		if(rs.success){
			showMessage('success',rs.msg,rs.url);
		}
		else{
			showMessage('erroe',rs.msg,rs.url);
		}
	});
})
</script>
</block>